package com.sisyphus.spinach.network.views;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sisyphus.spinach.core.INetTask;

import java.util.List;

public class BaseQuickList<T> implements INetTask.View<List<T>> {

    private final BaseQuickAdapter<T, BaseViewHolder> adapter;

    public BaseQuickList(BaseQuickAdapter<T, BaseViewHolder> adapter) {
        this.adapter = adapter;
    }

    @Override
    public void start() {

    }

    @Override
    public void failure(Throwable throwable) {

    }

    @Override
    public void complete() {

    }

    @Override
    public void success(List<T> data) {
        adapter.setList(data);
    }

}
